# @Author   : 懒羊羊
# @File     : day02_css.py
# @Time     : 2024/12/4 16:02
import time

from selenium import webdriver
from selenium.webdriver.common.by import By

wd = webdriver.Chrome()

wd.get("https://www.baidu.com/")
wd.maximize_window()

wd.implicitly_wait(10)

# wd.find_element(By.CSS_SELECTOR, "#kw").send_keys("python")
# wd.find_element(By.CSS_SELECTOR, ".s_ipt").send_keys("python")
wd.find_element(By.CSS_SELECTOR, "input[class^='s_i']").send_keys("python")

# wd.find_element(By.CSS_SELECTOR, "input[value='百度一下']").click()
wd.find_element(By.CSS_SELECTOR, 'input[type="submit"][value="百度一下"]').click()

time.sleep(2)

wd.quit()
